Skip to content

fix(Form): input and output type inference #3938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2025
Merged

Conversation

romhml
Copy link
Member

@romhml romhml commented Apr 20, 2025

πŸ”— Linked issue

Resolves #3843

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Improve the Form components type to fix type inference issues. For libraries implementing Standard Schema, the form's I/O types will now be correctly infered based on the schema type.

These new typings are centered around StandardSchema and was made compatible with Yup and Superstruct. For Joi on the other hand, the type inference will fail silently and resolve I/O types to any.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@romhml romhml requested a review from sandros94 April 20, 2025 12:48
Copy link

pkg-pr-new bot commented Apr 20, 2025

npm i https://pkg.pr.new/@nuxt/ui@3938

commit: 5433de6

@romhml romhml marked this pull request as ready for review April 20, 2025 12:57
Copy link
Contributor

nuxthub-admin bot commented Apr 20, 2025

βœ… Deployed ui3

Deployed ui3 5433de6 to preview

πŸ”— fix-form-type-inference.ui-6q2.pages.dev
πŸ“Œ 1e4705a6.ui-6q2.pages.dev
πŸ“±
View QR Code QR code linking to deployment URL.

πŸ“‹ View deployment logs

@benjamincanac benjamincanac merged commit f429498 into v3 Apr 21, 2025
6 of 7 checks passed
@benjamincanac benjamincanac deleted the fix/form-type-inference branch April 21, 2025 09:04
@benjamincanac benjamincanac added the v3 #1289 label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UForm @submit event type error
2 participants